SET ECHO OFF
SET FEEDBACK OFF
SET HEADING OFF
COLUMN dummy NOPRINT
REM COLUMN department_id NOPRINT
SET PAGESIZE 5000

SELECT     0 dummy, department_id, 'Department: ' || DEPARTMENT_NAME 
FROM       departments
WHERE     department_id IN (SELECT department_id 
                	                     FROM employees)
UNION
SELECT     1, department_id,'   ' || first_name
FROM        employees
WHERE      department_id IN (SELECT department_id 
	                      FROM departments);


COLUMN dummy PRINT
COLUMN department_id PRINT
SET FEEDBACK ON
SET HEADING ON
